# Qire, the Qi Remote Extension
Qi is the package manager for Dragora GNU+Linux-Libre version 3+. It's a
fantastic, simple manager but lacks the ability to use a remote
repository. That's were Qire comes into play! Qire allows users to download,
install, and upgrade software found in user-specified repos. The goal is to be
simple, easy-to-use, and dynamic. Qire is able to sync with multiple repositories and even install/upgrade multiple versions of the same program!

## Dependencies
### Build
  - Lua 5.3
  - [Fennel](https://fennel-lang.org)
  - [Lispy-Fennel](https://notabug.org/nuclearkev/lispy-fennel)
  - luarocks
    - luastatic
  - make

### Runtime
   - wget
   - qi
   - sha256sum

## Build
  With make:
  ```
  > make
  ```
  You will find the binary in the root directory. Use `make clean` to clean.

## In-Progress
### TODO Basics
  - [ ] Update
    - [ ] Test it
  - [x] Basic upgrade
  - [x] Install [4/4]
    - [x] Get pkg data for list of pkg-names
    - [x] Build .tlz name from pkg-data
    - [x] Fetch pkg from repo
    - [x] Install with qi
  - [x] Search
  - [x] Delete [2/2]
    - [x] Find package
    - [x] Delete with qi
  - [x] Search Installed [1/1]
    - [x] Actually search the real directory
  - [x] Build Index
  - [x] Help

### DONE Intermediate
   - [x] Check installed versions before installing and upgrade [2/2]
     - [x] Don't installed if there is already one installed
     - [x] Don't update if there isn't one already installed or if the version
     in the repo is equal to the one installed.
   - [x] Repo selection [2/2]
     - [x] `-r` option
     - [x] User input after running -i or -u
   - [x] User input to verify installation, deletion, etc.
     - "Are you sure? [Y]/n"
   - [x] SHA256 check with install and upgrade
   - [x] Use real directories [2/2]
     - [x] `/var/cache/qire/${package-tlz}`, for when you are
       installing and upgrading
     - [x] `/etc/qire` for config
   - [x] -I, --info command
   - [x] -C, --clear-cache command
   - [x] -o, --output setting for choosing the output directory of fetched files
   - [x] Show installed vs updated version when updating
   - [x] Local info command

### TODO Advanced
   - [x] Man page
   - [ ] texinfo
   - [x] Real Makefile
     - [x] Placing everything in the correct spot
     - [x] Defaulting the correct config based on arch
   - [x] Check meta tag file for version, if tlz lacks
   - [x] qi categories [5/5]
     - [x] Support parsing them
     - [x] Installation all with a category (-C, --category)
     - [x] Upgrading all with a category
     - [x] Search locally by category
     - [x] Remove entire categories
   - [x] -l, --local for install/upgrade
   - [x] version selection for upgrading packages
     - If you have 2 version of a package installed, you must select which one
       to upgrade
   - [x] default repo(s) [6/6]
     - [x] Have a default setting in the config. Favors those repos (or
     repo) over others.
     - [x] If default set to 'all', it will always search all repos.
     - [x] If default repo(s) lacks package, search others
     - [x] If duplicate amongst defaults, show user selection
     - [x] If duplicates amongst non-defaults, show user selection
     - [x] `-r all` will override default setting
   - [x] Support multiple versions of the same package [3/3]
     - [x] List many of the same version from repos
       - Use the list returned from an :exact search
     - [x] If many versions installed, show user selection upon delete
     - [x] Select which version to upgrade if you have more than 1 installed
   - [x] Actual version comparison
     - Basically won't let you "upgrade" to a lessor or equal version.
   - [x] downgrade command
   - [ ] Better UI

### TODO Maintenance
   - [x] Upgrade to latest version of `qi`
   - [ ] Better error messages
   - [ ] code clean up
   - [ ] Major testing

### TODO Low Priority
   - [ ] local index building
   - [ ] More generic index building (non-table HTML parsing)
   - [ ] search for updates in the filesystem (--upgrade-all)

### TODO Future
    - [ ] Epic querying
      - [ ] `qire install lua_5.3` get version 5.3 of lua
      - [ ] `qire install lua_5.3-2` get version 5.3 rev 2 of lua
